import http from "@/util/request";

// 显示商家店铺信息
export function getShopInfo(query) {
  return http({
    url: "/shop/shopInfo/showShopInfo",
    method: "get",
    params: {
      businessId: query,
    },
  });
}

//商家入驻
export function addShopInfo(data) {
  return http({
    url: "/shop/shopInfo/addShop",
    method: "post",
    data: data,
  });
}

//商家店铺信息修改
export function updateShopInfo(data) {
  return http({
    url: "/shop/shopInfo/updateInfo",
    method: "put",
    data: data,
  });
}

//商家店铺营业状态修改
export function updateShopStatus(data) {
  return http({
    url: "/shop/shopInfo/updateStatus",
    method: "put",
    data: data,
  });
}

//商家店铺头像修改
export function updateShopAvatar(data) {
  return http({
    url: "/shop/shopInfo/updateAvatar",
    method: "put",
    data: data,
  });
}
// 根据商家ID获取店铺ID
export function getShopIdByBusinessId(businessId) {
  return http({
    url: "/shop/shopInfo/getShopIdByBusinessId",
    method: "get",
    params: {
      businessId: businessId,
    },
  });
}
